<template>
  <div class="container-wrap">
    <bodyWrap :isShow="bodyShow">
      <div slot="body" class="infoWrap" v-if="bodyShow">

        <template-items
          v-for="(item,index) in dailyDetail"
          :key="index + 3"
          :title="item.title"
          :list="item.list">
        </template-items>

        <div v-if="!countShow">
          <template-items
            v-for="(item,index) in submitList"
            :key="index"
            :title="item.title"
            :list="item.list">
          </template-items>
          <!--按钮区域-->
          <div class="btn-wrap" v-if="detail.isSubmit != 1">
            <div class="btn-b" @click="submit">提交</div>
          </div>
        </div>



        <transition-group name="fadeShow">

          <!--报告汇总-->
          <div class="d-item-wrap"
               :key="11"
                v-if="countShow && detail">
            <div class="d-title"></div>
            <div class="d-content">
              <div class="item">
                <div class="label">
                  报告统计
                </div>
                <div class="txt">
                  <div class="txt-multiLine">
                    共下发 <span class="blue1Color"> {{detail.totalFeedback}} </span> 家单位，<span class="blue1Color"> {{detail.hadFeedback}} </span>家反馈[其中<span class="greenColor">{{detail.overHadFeedback}}</span>家超时反馈]，<span class="redColor"> {{detail.havingFeedback}} </span> 家未反馈

                    预计在今日 <span class="redColor"> {{detail.dailyReleaseTime}} </span> 进行下一轮发布
                  </div>
                </div>
              </div>
            </div>
          </div>

          <!--已反馈-->
          <div class="d-item-wrap"
               :key="12"
               v-if="feedBackList.length">
            <div class="d-title">已反馈</div>
            <div class="d-content">
              <div class="item fold-hide"
                   v-for="item in feedBackList">
                <div class="feedBack-item">
                  <div class="fb-label">单位：</div>
                  {{item.feedbackUnit}}
                </div>
                <div class="feedBack-item">
                  <div class="fb-label">
                    联系人：
                  </div>
                  {{item.writerName }}
                </div>
                <div class="feedBack-item">
                  <div class="fb-label">
                    联系方式：
                  </div>
                  {{item.writerPhone}}
                </div>
                <div class="feedBack-item">
                  <div class="fb-label">
                    反馈时间：
                  </div>
                  {{item.writingTime}}
                </div>
                <div class="feedBack-item">
                  <div class="fb-label">
                    系统运行情况：
                  </div>
                  {{item.systemSituation}}
                </div>
                <div class="feedBack-item">
                  <div class="fb-label">
                    受攻击次数：
                  </div>
                  {{item.attackNumber}}次
                </div>
                <div class="feedBack-item">
                  <div class="fb-label">
                    发生事件数：
                  </div>
                  {{item.eventNumber}}次
                </div>
              </div>
            </div>
            <foldWrap :list="feedBackList"></foldWrap>
          </div>

          <!--未反馈-->
          <div class="d-item-wrap"
               :key="13"
               v-if="unFeedBackList.length">
            <div class="d-title">未反馈</div>
            <div class="d-content">
              <div class="item fold-hide"
                   v-for="item in unFeedBackList">
                <div class="feedBack-item">
                  <div class="fb-label">单位：</div>
                  {{item.feedbackUnit}}
                </div>
                <div class="feedBack-item">
                  <div class="fb-label">
                    联系人：
                  </div>
                  {{item.writerName}}
                </div>
                <div class="feedBack-item">
                  <div class="fb-label">
                    联系方式：
                  </div>
                  {{item.writerPhone}}
                </div>
              </div>
            </div>
            <foldWrap :list="unFeedBackList"></foldWrap>
          </div>

        </transition-group>

      </div>
    </bodyWrap>
    <transition name="slideRight">
      <router-view></router-view>
    </transition>
  </div>
</template>

<script>

  import drDetail from "./drDetail.js"
  export default drDetail

</script>
